<form id="pagerForm" action="__ACTION__" method="post">
	<input type="hidden" name="pageNum" value="{$_REQUEST.pageNum}"/>
	<input type="hidden" name="numPerPage" value="{$_REQUEST.numPerPage}" />
	<input type="hidden" name="orderField" value="{$_REQUEST.orderField}" />
	<input type="hidden" name="orderDirection" value="{$_REQUEST.orderDirection}" />
	<input type="hidden" name="do" value="{$_REQUEST.do}">
	<volist name="_search" key="name" id="field">
		<input type="hidden" name="_search[{$key}]" value="{$field|safe}"/>
	</volist>
	<input type="hidden" name="account" value="{$_REQUEST.account}"/>
</form>

<div class="page">
	<div class="pageHeader">
		<form onsubmit="return navTabSearch(this);" action="__URL__/view_channel/id/{$map.channel_id}" method="post">
		<input type="hidden" name="pageNum" value="{$_REQUEST.pageNum}"/>
		<div class="searchBar">
			<ul class="searchContent">

				<li>
					<label>产品类型：</label>
					{:Helper("Form")->name('_search[version_type]')->value($_search[version_type])->option(D("SysVersionChannel")->versionType)->select()}
				</li>
				
                <div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div>
			</ul>
		</div>
		</form>
	</div>

	<div class="pageContent">
		<div class="panelBar">
		</div>
		<table class="list" width="100%" layoutH="138">
			<thead>
			<tr>
				<th width="60">编号</th>
				<th width="100">渠道id</th>
				<th width="100">渠道名称</th>
				<th>应用类型</th>
				<th width="200">版本</th>
				<th width="80">版本号</th>
				<th>创建者</th>
                <th>记录创建时间</th>
				<th>当前状态</th>
			</tr>
			</thead>
			<tbody>
			<volist id="vo" name="list">
				<php>
					$version = D("SysVersion")->find($vo['version_id']);
				</php>
				<tr target="sid_node" rel="{$vo['id']}">
					<td>{$vo['id']}</td>
					<td>{$vo['channel_id']}</td>
					<td>{:D('SysChannel')->getChannelName($vo['channel_id']);}</td>
                    <td>
                    	{:D("SysVersionChannel")->versionType[$vo['version_type']]}
                    </td>
                    <td>{$version.version_name}</td>
                    <td>{$version.version_code}</td>
                    <td>{:D("Admin")->where(["id"=>$vo['create_admin_id']])->getField('nickname');}</td>
                    <td>{$vo['create_at']|date='Y-m-d H:i:s', ###}</td>
					<td class="status_{$vo['status']}">
						{:D('SysVersionChannel')->getStatus($vo['status']);}
					</td>
				</tr>
			</volist>
			</tbody>
		</table>

		<div class="panelBar">
			<div class="pages">
				<span>显示</span>
				<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
					<option value="10" <eq name="numPerPage" value="10">selected</eq>>10</option>
					<option value="20" <eq name="numPerPage" value="20">selected</eq>>20</option>
					<option value="50" <eq name="numPerPage" value="50">selected</eq>>50</option>
					<option value="100" <eq name="numPerPage" value="100">selected</eq>>100</option>
					<option value="200" <eq name="numPerPage" value="200">selected</eq>>200</option>
				</select>
				<span>共{$totalCount}条</span>
			</div>
			<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>
		</div>
	</div>
</div>
<script>
function sort(id, sort)
{
	$.get("__URL__/sort/id/"+id+"/sort/"+sort.value);
}
</script>